﻿using StarsAdmin.Application.Auth.Dtos;
using StarsAdmin.Application.Menu.Dtos;
using StarsAdmin.Core.DI;
using StarsAdmin.Core.Models;

namespace StarsAdmin.Application.Auth.Services
{
    public interface IAuthService : IDependency
    {
        /// <summary>
        /// 用户登录
        /// </summary>
        /// <param name="loginInput"></param>
        /// <returns></returns>
        Task<CurrentUserDto?> LoginAsync(LoginInput loginInput);

        /// <summary>
        /// 获得刷新Token
        /// </summary>
        /// <param name="refreshToken"></param>
        /// <returns></returns>
        Task<string> GetRefreshTokenAsync(string refreshToken);

        /// <summary>
        /// 获取当前用户
        /// </summary>
        /// <returns></returns>
        Task<CurrentUserDto?> GetUserInfoAsync();

        /// <summary>
        /// 根据用户Id获取权限菜单
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<List<MenuDto>> GetAuthMenusAsync(long id);

        /// <summary>
        /// 根据用户Id获取权限按钮
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<List<MenuDto>> GetAuthButtonsAsync(long id);

        /// <summary>
        /// 根据用户Id获取按钮权限字段
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<List<string>> GetAuthButtonPermissionsAsync(long id);
    }
}